package com.jzx.provider.exception;

/**
 * @author daihuihui
 * @date 2019/2/4
 */
public abstract class MyRuntimeException extends RuntimeException {
    private String errorCode;

    public MyRuntimeException(String errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public MyRuntimeException(String errorCode, Exception e) {
        super(e.getMessage() != null && !"".equals(e.getMessage()) ? e.getMessage() : e.toString(), e);
        this.errorCode = errorCode;
    }

    public String getErrorCode() {
        return this.errorCode;
    }
}